<template>
  <div>
  开始<el-input v-model="form.min" />
  结束<el-input v-model="form.max" />
  选择审批职务，展示职务列表，多选择框
  <el-checkbox-group v-model="checkList">
    <el-checkbox :label="i.name" v-for="i in datalist"></el-checkbox>
  
  
  </el-checkbox-group>
  <el-button @click='submit'>submit</el-button>
  
  </div>
</template>

<script>
export default {
    data(){
        return{
            form:{},
            checkList:[],
            datalist:[{"code":9,'name':'总经理','level':1},{"code":6,'name':'副总经理','level':2},{"code":8,'name':'总监','level':3},{"code":10,'name':'主管','level':4}]
        }
    },
    methods: {
        submit(){
            var str={}
            for(var i=0;i<this.datalist.length;i++){
                var name = this.datalist[i]['name']
                var code =  this.datalist[i]['code']
                var level =  this.datalist[i]['level']
                if (this.checkList.indexOf(name)>=0){
                    str[code]=level
                }
            }
           this.axios.post('admin/workflow/setworkflowaudit?',{"id":1,"idlist":JSON.stringify(str)}).then(res=>{

           })
        }
    },
}
</script>

<style>

</style>